
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)

project(intro LANGUAGES C)

include_directories(../common)

set(COMPILE_ALL OFF)

list(APPEND _sources
    ../common/error.c
    ../common/pathalloc.c
    ../common/prexit.c
    ../common/tellwait.c
)

if (COMPILE_ALL)
add_executable(fork1 01_fork1.c ${_sources})
add_executable(vfork 02_vfork.c ${_sources})
add_executable(wait1 03_wait1.c ${_sources})
add_executable(vfork2 04_fork2.c ${_sources})
add_executable(tellwait1 05_tellwait1.c ${_sources})
add_executable(tellwait2 06_tellwait2.c ${_sources})
add_executable(exec1 07_exec1.c ${_sources})
add_executable(echoall 08_echoall.c ${_sources})
add_executable(exec2 09_exec2.c ${_sources})
add_executable(systest1 11_systest1.c ${_sources})
add_executable(systest1 12_systest3.c ${_sources})
add_executable(pruids 13_pruids.c ${_sources})
add_executable(test1 14_test1.c ${_sources})
add_executable(pracct 15_pracct.c ${_sources})
add_executable(nice 16_nice.c ${_sources})
else()
add_executable(times1 17_times1.c ${_sources})
endif()
